# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=bionic_translation
pkgver=0_git20231123
pkgrel=0
_commit="b4525f3c0a8096ef42d878341ef3fe2ea36d4302"
pkgdesc="A set of libraries for loading bionic-linked .so files on musl/glibc"
url="https://gitlab.com/android_translation_layer/bionic_translation"
arch="x86_64 aarch64"
license="Apache-2.0"
makedepends="
	elfutils-dev
	libbsd-dev
	libunwind-dev
	mesa-dev
	meson
	samurai
	"
subpackages="$pkgname-dev $pkgname-dbg"
source="https://gitlab.com/android_translation_layer/bionic_translation/-/archive/$_commit/bionic_translation-$_commit.tar.gz"
builddir="$srcdir/bionic_translation-$_commit"

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
d2c1c427320c3c963fbdecad57d1b60cb926b18c9b2d5f1291f91fbaac3e16c416ed1d4d7c1fc59d3142c1b124288f951a18173753c5fabf39da05b04beaec33  bionic_translation-b4525f3c0a8096ef42d878341ef3fe2ea36d4302.tar.gz
"
